In recent years, a power saving function has advanced to reduce power consumption of devices, such as image forming apparatuses. With the power saving function, after a certain period of idleness, a device goes into “sleep mode” in which power is supplied to only part of the device, so that the device operates with low power consumption.
With the spread of network technology, there will be more situations where devices and hosts regularly exchange data via networks. A technique has been provided which allows data processing via a network even when a device is in “sleep mode”. In this technique, the device is equipped with multiple CPUs, a main CPU and a sub-CPU. The main CPU carries out processing in non-sleep mode, and the sub-CPU with low power consumption carries out the processing in place of the main CPU in sleep mode (see PTL 1).
In such a system, the sub-CPU has the function of determining whether to respond to or discard a received network packet on behalf of the main CPU, or restore the main CPU from sleep mode, and carrying out the processing as determined.
As devices have become more multifunctional in recent years, a main CPU for controlling such a device has been provided with more drivers. Therefore, for transition to sleep mode, it is necessary to perform stop processing for such drives. If the device is an image forming apparatus, the transition also involves processing for stopping an engine, such as a fixing unit.
It takes several seconds to perform such processing. That is, from the time when the device determines to go into sleep mode until the time when the device actually goes into sleep mode, it takes several seconds for the sleep preparation.
If the main CPU receives a network packet from an external host during the sleep preparation, the device may go into sleep mode during processing in a protocol stack or application, depending on the timing (see FIG. 7).
As illustrated in FIG. 7, during transition to sleep mode (710), even if a request packet (SNMP Request) 711 that requests processing is received from an external host 702, an image forming apparatus 701 goes into sleep mode (712) during processing in the protocol stack or application. Then, upon restoration from sleep mode (713), the image forming apparatus 701 advances the processing of the request packet 711 and transmits a reply packet (714) to the external host 702.
However, even if the image forming apparatus 701 advances the packet processing and transmits the reply packet upon restoration from sleep mode, the reply packet may be regarded as an invalid packet due to the lapse of a certain period of time, or may be regarded as an attack packet due to the arrival of the reply packet at an unexpected time for the external host 702.
Therefore, typically, packets to be transmitted and received during sleep preparation are discarded by the main CPU at the driver or protocol stack level (see FIG. 8).
As illustrated in FIG. 8, during transition to sleep mode (810), even if a request packet (SNMP Request) 811 that requests processing is received from an external host 802, an image forming apparatus 801 discards the packet (812) and goes into sleep mode (813).